package pl.easyshop.core.services;

import java.io.Serializable;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;


public abstract class AbstractBaseData implements IdentifiableData, Serializable {
	
	/** Unique serialization identifier. */
	private static final long serialVersionUID = 6687569151678986771L;

	/**
	 * Object identifier.
	 */
	private Long id;
	
	/**
	 * Version of object.
	 */
	private Long version;

	/**
	 * Get id property value.
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * Set id property value.
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * Get version property value.
	 * @return the version
	 */
	public Long getVersion() {
		return version;
	}

	/**
	 * Set version property value.
	 * @param version the version to set
	 */
	public void setVersion(Long version) {
		this.version = version;
	}
	
	@Override
	public String toString() {
		ToStringBuilder buidler = new ToStringBuilder(this, ToStringStyle.DEFAULT_STYLE);
		buidler.append("id", id);
		buidler.append("version", version);
		return buidler.toString();
	}
}
